package com.undsf.comikami

/**
 * Created by Arathi on 2017/9/13.
 */
class Page {
    int index
    String url

    String getFileName() {
        def idx = url.lastIndexOf("/")
        def fileName = url.substring(idx+1)
        return fileName
    }

    String getExtensionName() {
        def fileName = getFileName()
        def idx = fileName.lastIndexOf(".")
        def extName = fileName.substring(idx+1)
        return extName
    }

    String toString() {
        return index + " -> " + url
    }
}
